import { createWebHistory, createRouter } from "vue-router";

const defaultRoute = [
    {
        path: "/",
        redirect: "/home",
        meta: {
            title: "首页",
            auth: true
        }
    },
    {
        path: "/home",
        component: () => import("../views/home/index.vue"),
        meta: {
            title: "首页",
            auth: true
        }
    },
    {
        path: '/404',
        component: () => import('../views/404/index.vue')
    },
    {
        path: '/login',
        meta: {
            title: "404",
            auth: false
        },
        component: () => import('../views/login/index.vue')
    }
]

const router = createRouter({
    routes: defaultRoute,
    history: createWebHistory(),
});
export default router;